<template>
  <view class="krd-page">
    <view class="krd-page-content">
      <slot></slot>
    </view>
    <KrdCustomTabBar v-if="showTabBar" />
  </view>
</template>

<script setup lang="ts">
import KrdCustomTabBar from "@/components/KrdCustomTabBar.vue";

// 定义组件属性
interface Props {
  showTabBar?: boolean;
}

// 设置默认属性
withDefaults(defineProps<Props>(), {
  showTabBar: true,
});
</script>

<style scoped>
.krd-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 20rpx;
  box-sizing: border-box;
}

.krd-page-content {
  flex: 1;
  padding-bottom: 80rpx;
}
</style>
